<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="time">2020-5-7</div>
    <script>
        //get 获得 element 元素 by 通过 驼峰命名法
        //返回的是一个对象
        var timer = document.getElementById('time');
        console.log(timer);
        console.log(typeof timer);
        //打印返回的元素对象，可查看属性和方法
        console.dir(timer);
    </script>
</body>

</html>